﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Markup;

namespace ScratchNet.Common
{
    public class IOBoardContent
    {
        public Dictionary<LinkIOTypeEmParaDLL, List<MonitorPlcVar>> IOTypeCountDict = new Dictionary<LinkIOTypeEmParaDLL, List<MonitorPlcVar>>();
        public int nSlaveNum;
        public HardBoardType HDType;
        public bool bEds300ModuleName;
    }

    public enum LinkIOTypeEmParaDLL
    {
        DIn_PLC, //0
        DOut_PLC, //1
        AIn_PLC,//2
        AOut_PLC,//3
        PWMDuty_PLC,//4
        PWMFreq_PLC,//5
        DIn_HD,//6
        DOut_HD,//7
        AIn_HD,//8
        AOut_HD,//9
        PWMDuty_HD,//10
        PWMFreq_HD,//11
        AxisMain,//12
        AxisAux,//13
        HeightSensor,//14
        Default//14
    }
    public enum HardBoardType
    {
        EDS2000 = 1,
        EDS2010,
        EDS2011,
        EDS3020,
        ServoDrive,
        EIM1016,
        EIM1116,
        EIM2016,
        EIM2116,
        EIM3114,
        EIM3118,
        EIM4114,
        EIM4118,
        EIM5312,
        EIM5322,
        EIM88C1,
        Unknown
    }

    public class HDMonitor
    {
        public HardBoardType HDType;
        public bool bEds300ModuleName = false;
        public List<MonitorPlcVar> listHDChildren = new List<MonitorPlcVar>();
    }
    public class MonitorPlcVar
    {
        public LinkIOTypeEmParaDLL IOType;
        public string plcPinName;
        public string listenPinAddress;
        public string description;
        public string descriptionEn;
        public int nSlaveNum;
        public string PLCVarIndex;

    }
}
